package com.zimu.api.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zimu.api.mapper.InterfaceInfoMapper;
import com.zimu.common.model.entity.InterfaceInfo;
import com.zimu.common.service.CommonInterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

@DubboService
public class CommonInterfaceInfoServiceImpl implements CommonInterfaceInfoService {

    @Resource
    InterfaceInfoMapper interfaceInfoMapper;

    @Override
    public InterfaceInfo getOneByUrl(String uri) {
        QueryWrapper<InterfaceInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("uri",uri);
        return interfaceInfoMapper.selectOne(queryWrapper);
    }
}
